package com.appcenter.application.mapper;


import com.appcenter.application.input.jobCategory.GetJobCategorysInput;
import com.appcenter.application.model.JobCategorys;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

@org.apache.ibatis.annotations.Mapper
@Repository
public interface JobCategorysMapper extends Mapper<JobCategorys> {

    @Select("<script>" +
            " select * from  jobcategorys where Deleted=0  " +
            ""+
            " <when test='_parameter != null'>" +
            " and AppCode=#{appCode}"+
            " </when>" +
            ""+
            ""+
            " <when test='_parameter==null'>" +
            " AND AppCode IS NULL"+
            " </when>" +
            ""+
            " order by IdPath,Sort "+
            " </script>")
    public List<JobCategorys> GetJobCategoryTreeList(String AppCode);
}


